<?php

namespace style;

class validator extends \system\core\validator
{

	function __construct($validator_definition_file=null)
	{
		if( !isset($validator_definition_file) ) $this->setDefinition("res/css_definition.cfg");
		else $this->setDefinition($validator_definition_file);
		$this->load_definition();
	}

	public function setStyle($key, $val)
	{
		$this->$key = $val;
	}

	public function getStyleDefinition($attribute)
	{
		//Check is key exists. For existance, we have to check the first element. This depends on the definition layout!
//			if(self::$cssrules->has("css->".$attribute."->1")
//							&& strtolower(self::$cssrules->getkey("css->".$attribute."->1")) == "use"){
//				return self::$cssrules->get("css->".$attribute);
//			}
		if( $this->struct->has("css->".$attribute."->1")
						&& strtolower($this->struct->getkey("css->".$attribute."->1")) == "use" )
		{
			return $this->struct->get("css->".$attribute);
		}
	}

}

?>
